package com.bocai.freeman.view.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.bocai.freeman.R;

/**
 * Created by admin on 2016/5/27.
 */
public class CharmAdapter extends BaseAdapter {
    private Context context;
    private int size;
    public CharmAdapter(Context context, int size){
        this.context=context;
        this.size=size;
    }
    @Override
    public int getCount() {
        return size;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder;
        if(convertView==null)
        {
            convertView= LayoutInflater.from(context).inflate(R.layout.charm_item,null);
            viewHolder=new ViewHolder();
            convertView.setTag(viewHolder);
        }else{
            viewHolder= (ViewHolder) convertView.getTag();
        }

        return convertView;
    }
    class ViewHolder{

    }
}
